#  Copyright (c) 2014-present, Facebook, Inc.
#  All rights reserved.
#
#  This source code is licensed as defined on the LICENSE file found in the
#  root directory of this source tree.

load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library")
load("//tools/build_defs/oss/osquery:native.bzl", "osquery_target")

osquery_cxx_library(
    name = "filesystem_config",
    srcs = [
        "filesystem_config.cpp",
    ],
    header_namespace = "plugins/config",
    link_whole = True,
    visibility = ["PUBLIC"],
    deps = [
        osquery_target("osquery/config:config"),
        osquery_target("osquery/utils/config:utils_config"),
    ],
)

osquery_cxx_library(
    name = "tls_config",
    srcs = [
        "tls_config.cpp",
    ],
    header_namespace = "plugins/config",
    exported_headers = [
        "tls_config.h",
    ],
    tests = [
        osquery_target("plugins/config/tests:tls_config_tests"),
    ],
    link_whole = True,
    visibility = ["PUBLIC"],
    deps = [
        osquery_target("osquery/config:config"),
        osquery_target("osquery/remote:requests"),
        osquery_target("osquery/remote:utility"),
        osquery_target("osquery/remote/serializers:serializer_json"),
    ],
)

osquery_cxx_library(
    name = "update_config_plugin",
    srcs = [
        "update.cpp",
    ],
    header_namespace = "plugins/config",
    link_whole = True,
    visibility = ["PUBLIC"],
    deps = [
        osquery_target("osquery/config:config"),
    ],
)
